﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using YJKRevitStairs.StairsModel.CommonUnit;
using YJKRevitStairs.StairsModel.Manage;

namespace YJKRevitStairs.StairsModel.DataInfos
{
	public class DoubleBranchParallelStairs : BaseCommonStairs
	{
		public DoubleBranchParallelStairs()
		{
			base.m_sName = "双分平行楼梯";
		}

		public DoubleBranchParallelStairs(StairsCreator Creator)
		{
			base.m_sName = "双分平行楼梯";
			this.m_StairsCreator = Creator;
		}

		public override void DrawStairs()
		{
			DoubleBranchParallelStairsCreator doubleBranchParallelStairsCreator = this.m_StairsCreator as DoubleBranchParallelStairsCreator;
			if (doubleBranchParallelStairsCreator != null)
			{
				doubleBranchParallelStairsCreator.CreateDoubleBranchParallelStairs(this);
			}
		}

		public double getStairsWidth()
		{
			return 2.0 * this.m_dWellWidth + this.m_LeftRunData.RunWidth + this.m_MidRunData.RunWidth + this.m_RightRunData.RunWidth;
		}

		public void TransFormRailPoints()
		{
			foreach (BaseRaillingData baseRaillingData in this.m_listRail)
			{
				baseRaillingData.m_ptStart = Geometry.TransformPoint(baseRaillingData.m_ptStart, base.m_Transform);
			}
		}

		public void TransFormOutSupportPoints()
		{
			List<XYZ> list = new List<XYZ>();
			foreach (XYZ point in this.m_listOutSupportPoints)
			{
				XYZ item = Geometry.TransformPoint(point, base.m_Transform);
				list.Add(item);
			}
			if (list.Count > 0)
			{
				this.m_listOutSupportPoints.Clear();
				this.m_listOutSupportPoints.AddRange(list);
			}
		}

		public LineRunData m_LeftRunData { get; set; }

		public LineRunData m_MidRunData { get; set; }

		public LineRunData m_RightRunData { get; set; }

		public BaseBeamData m_BeamData { get; set; }

		public BaseLandingData m_LandData { get; set; }

		public XYZ m_ptPosition { get; set; }

		public double m_dWellWidth { get; set; }

		public double m_dBottomElevation { get; set; }

		public double m_dLevelValue { get; set; }

		public double m_dBottomOffset { get; set; }

		public double m_dTopOffset { get; set; }

		public FloorType m_FloorType { get; set; }

		public bool m_bIsCenterUp { get; set; }

		public List<string> m_arLandWidth { get; set; }

		private StairsCreator m_StairsCreator;

		public List<XYZ> m_listOutSupportPoints = new List<XYZ>();
	}
}
